word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).

crossword(V1,V2,V3,H1,H2,H3) :- 
	word(V1,V12,V13,V14,V15,V16,V17,V18),
	word(V2,V22,V23,V24,V25,V26,V27,V28),
	word(V3,V32,V33,V34,V35,V36,V37,V38),
	word(H1,H12,V13,H14,V23,H16,V33,H18),
	word(H2,H22,V15,H24,V25,H26,V35,H28),
	word(H3,H32,V17,H34,V27,H36,V37,H38).

%crossword(X,Y,Z,G,H,J).  query for finding solutions!!.